//
//  TYZNetworkAgent.h
//  DrivieSchoolStudents
//
//  Created by TangBin on 2019/5/29.
//  Copyright © 2019 班文政. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@class TYZBaseRequest;

/**
 封装了AFN库
 */
@interface TYZNetworkAgent : NSObject

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

+ (instancetype)sharedInstance;

/**
 添加请求

 @param request request description
 */
- (void)addRequest:(TYZBaseRequest *)request;

/**
 取消单个请求

 @param request request description
 */
- (void)cancelRequest:(TYZBaseRequest *)request;

/**
 取消所有请求
 */
- (void)cancelAllRequests;

/**
 构造请求地址，得到完整的请求地址

 @param request request description
 @return return value description
 */
- (NSString *)buildRequestUrl:(TYZBaseRequest *)request;

@end

NS_ASSUME_NONNULL_END
























